package com.ruoyi.project.insurance.contract.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.insurance.contract.domain.Contract;
import com.ruoyi.project.insurance.contract.mapper.ContractMapper;
import com.ruoyi.project.insurance.contract.service.IContractService;
import com.ruoyi.project.insurance.contract.service.ReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * reviewService业务层处理
 *
 */
@Service
public class ReviewServiceImpl implements ReviewService
{
    @Autowired
    private ContractMapper contractMapper;

    /**
     * 查询contract
     * 
     * @param id contract主键
     * @return contract
     */
    @Override
    public Contract selectContractById(String id)
    {
        return contractMapper.selectContractById(id);
    }

    /**
     * 查询contract列表
     * 
     * @param contract contract
     * @return contract
     */
    @Override
    public List<Contract> selectContractList(Contract contract)
    {
        return contractMapper.selectContractList(contract);
    }

    /**
     * 新增contract
     * 
     * @param contract contract
     * @return 结果
     */
    @Override
    public int insertContract(Contract contract)
    {
        return contractMapper.insertContract(contract);
    }

    /**
     * 修改contract
     * 
     * @param contract contract
     * @return 结果
     */
    @Override
    public int updateContract(Contract contract)
    {
        return contractMapper.updateContract(contract);
    }

    /**
     * 批量删除contract
     * 
     * @param ids 需要删除的contract主键
     * @return 结果
     */
    @Override
    public int deleteContractByIds(String ids)
    {
        return contractMapper.deleteContractByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除contract信息
     * 
     * @param id contract主键
     * @return 结果
     */
    @Override
    public int deleteContractById(String id)
    {
        return contractMapper.deleteContractById(id);
    }
}
